﻿{include file="public/top"}
<div class="login-reg">
	<dl class="box">
		<dt>注册</dt>
		<form id="register_form">
			<dd>
				<label>账号：</label>
				<input class="input" type="text" name="user" value=""/>
				<div class="clear"></div>
			</dd>
		<dd>
			<label>密码：</label>
			<input class="input" type="password" name="newpass" />
			<div class="clear"></div>
		</dd>
		<dd>
			<label>确认密码：</label>
			<input class="input" type="password" name="chkpass" />
			<div class="clear"></div>
		</dd>
        <dd>
			<label>姓名：</label>
			<input class="input" type="text" name="fullname"  id="fullname" />
			<div class="clear"></div>
		</dd>
		<dd>
			<label>公司全称：</label>
			<input class="input" type="text" name="company" id="company" />
			<div class="clear"></div>
		</dd>
        <dd>
			<label>所在部门：</label>
			<input class="input" type="text" name="m_title" id="m_title" />
			<div class="clear"></div>
		</dd>
        
		<dd>
			<label>Email：</label>
			<input class="input" type="text" name="email" value="" id="email" />
			<div class="clear"></div>
		</dd>
		<dd>
			<label>手机：</label>
			<input class="input" type="text" name="mobile" id="mobile" />
			<div class="clear"></div>
		</dd>
		<dd>
			<label>验证码：</label>
				<input class="vcode"  type="text" id="captcha" name="captcha" />
				<img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}?seed='+Math.random()" height="24" id="captcha"  class="hand"/>
			<div class="clear"></div>
		</dd>
		<dd>
			<label class="agreement">
				<input type="checkbox" name="is_ok" id="is_ok" checked /> 我已阅读并完全同意阅读注册协议
			</label>
		</dd>
		<dd class="submit">
			<bottom class="button blue" onclick="click_register()">注册会员</bottom>
		</dd>
		</form>
	</dl>
	<dl class="box">
		<dt>协议说明</dt>
		<dd style="padding-bottom:0;">

		</dd>
	</dl>
	<div class="clear"></div>
</div>
{include file="public/bottom"}
</body>
</html>
<script type="text/javascript">
layui.use('layer', function(){
	var layer = layui.layer;
});              
function click_register()
{
	$.ajax({
		url:"{:url('index/common/register')}",
		data:$('#register_form').serialize(),
		type:'post',
		async: false,
		dataType:"json",
		success:function(res) {
			if(res.code == 1) {
				layer.alert(res.msg, function(index)
				{
					location.href = res.url;
				})
			} else {
				layer.msg(res.msg);
			}
		}
	})
}
</script>
